<template>
    <div>
        <van-nav-bar title="商品列表" left-text="返回" left-arrow @click-left="onClickLeft" />
        <van-skeleton title :row="3" v-if="status"/>
        <div v-for="item in search">
            <router-link :to="'/xq/' + item.goods_id">
                <van-card num="2" price="2.00" desc="描述信息" :title="item.goods_name"
                    :thumb="goods_small_logo ? goods_small_logo : 'https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg'" />
            </router-link>
        </div>
    </div>
</template>
<script setup>
import { ref } from 'vue';
import { searchApi } from '@/api/api'
import { useRoute } from 'vue-router';
let search = ref([])
let router = useRoute();
searchApi(router.params.query).then(res => {
    console.log('商品列表数据', res);
    search.value = res.data.message.goods
})
let status=ref(true)
setTimeout(()=>{
    status.value=false
},5000)

</script>

<style lang="scss" scoped></style>